	<?php $this->load->view('admin/partials/subscription_menu'); ?>
	<?php 
		$ci= &get_instance();
	?>
		
	<div class="clrboth"></div>

	<h3>SMS Compose</h3>
	<?php $buttons = array('buttons'=>array('Compose#sms_compose();') );?>
	<?php $this->load->view('admin/partials/buttons', $buttons ); ?>
	
	<div class="clrboth"></div>

	<table border="0" class="table-list">
		<thead>
			<tr> 	 	 	 	
				<th>Content</th>
				<th>Status</th>
				<th>Last Sent Date</th>
				<th>Created Date</th>
				<th>Manage</th>
			</tr>
		</thead>
		
		<tbody>
			<?php foreach( $items['records'] as $item ): ?>
			<?php 
				$EMAIL = $ci->email_subscription_entity->init('id',$item->id);
			?>
			<tr>
				<td><?php echo $EMAIL->getSmsContent(); ?></td>
				<td><?php echo $EMAIL->getSent(); ?></td>
				<td><?php if($EMAIL->getSent() == 'Sent') echo sysDateTimeFormat($EMAIL->getLastSentDate()); ?></td>
				<td><?php echo sysDateTimeFormat($EMAIL->getCreatedDate()); ?></td>
				<td>
					<a href="javascript:void(0);" onclick="send_sms(<?php echo $item->id;?>);" >Send</a>
					
					&nbsp;|&nbsp;
					<a href="javascript:void(0);" onclick="edit_sms(<?php echo $item->id;?>);" >Edit</a>
					&nbsp;|&nbsp;
					<a href="javascript:void(0);" onclick="delete_sms(<?php echo $item->id;?>);" >Delete</a>
					<?php echo loader_image("id=\"loader_image_{$item->id}\" class=\"hidden\"");?>
				</td>
			</tr>
			<?php endforeach; ?>
		</tbody>
	</table>
	<div class="inner"><?php echo $items['pagination']['links'];?></div>

